﻿@{
    ViewBag.Title = "Loan_Info";
}

<link rel="stylesheet" type="text/css" href="~/Easy-UI/easyui/1.3.4/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/wu.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/icon.css" />
<script type="text/javascript" src="~/Easy-UI/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>

<form id="ff" action="/House/loanAdd">
    <table id="tt">
        <tr class="qqq">
            <th style="font-size:14px;">借款人员姓名：</th>
            <td><input class="easyui-textbox" name="loan_Name" data-options="prompt:'请输入...',validType:'txtname'" style="width:200px;height:24px"></td>

            <th>身份证号：</th>
            <td><input class="easyui-textbox" name="loan_IdCard" data-options="prompt:'请输入...',validType:'txtname'" style="width:200px;height:24px"></td>

            <th>联系电话：</th>
            <td><input class="easyui-textbox" name="loan_TEL" data-options="prompt:'请输入...',validType:'txtname'" style="width:200px;height:24px"></td>

            <td><a href="#" onclick="aaa()">添加联系人</a></td>
        </tr>
    </table>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add" style="margin-left:830px;" onclick="submitForm()">Submit</a>
</form>

<form id="capital" action="/House/CapitalAddDo">
    <table id="">
        <tr>
            <th>联系人：</th>
            <td><input class="easyui-textbox" name="loan_Contacts" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>联系人电话：</th>
            <td><input class="easyui-textbox" name="loan_ContactsTEL" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>房屋剩余年限：</th>
            <td><input class="easyui-textbox" name="surplus_Years" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>贷款额度（万元）：</th>
            <td><input class="easyui-textbox" name="basic_Quota" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>房屋坐落：</th>
            <td><input class="easyui-textbox" name="house_Located" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>房屋用途：</th>
            <td><select class="easyui-combotree" url="data/city_data.json" name="house_Purpose" style="width:300px;"></select></td>
        </tr>
        <tr>
            <th>建成年代：</th>
            <td><input class="easyui-textbox" name="house_Time" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr>
            <th>建成年代来源：</th>
            <td><select class="easyui-combotree" url="data/city_data.json" name="yers_Source" style="width:300px;"></select></td>
        </tr>
        <tr>
            <th>报告类型：</th>
            <td><select class="easyui-combotree" url="data/city_data.json" name="presentation_Type" style="width:300px;"></select></td>
        </tr>
        <tr>
            <th>评估受理：</th>
            <td style="text-align:left">
                <input type="checkbox" id="one" />审核评估登记表
                <input type="checkbox" id="one" />身份证明
                <input type="checkbox" id="one" />房屋权属
                <input type="checkbox" id="one" />网签合同
            </td>
        </tr>
        <tr>
            <th>所属部门：</th>
            <td><select class="easyui-combotree" url="data/city_data.json" name="the_Department" style="width:300px;"></select></td>
        </tr>
        <tr>
            <th>勘察员：</th>
            <td><select class="easyui-combotree" url="data/city_data.json" name="survey" style="width:300px;"></select></td>
        </tr>
        <tr>
            <th>估价员：</th>
            <td><select class="easyui-combotree" url="data/city_data.json" name="evaluation" style="width:300px;"></select></td>
        </tr>
        <tr>
            <th>评估通知单出具日期：</th>
            <td><input class="easyui-textbox" name="issue_Time" data-options="prompt:'请输入...',validType:'txtname'" style="width:300px;height:24px"></td>
        </tr>
        <tr style="text-align:center">
            <td colspan="2">
                <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add" onclick="submitcap()">Submit</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitcap()">Clear</a>
            </td>
        </tr>
    </table>
</form>

<script>
    load();

    function load() {
        $.ajax({
            type: "post", //要用post方式
            url: "/House/LeftBindingParent",//方法所在页面和方法名
            data: { roleid: 1 },
            dataType: "json",
            async: false,
            success: function (data) {

                valueField = "Dictionary_Id";
                textField = "Dictionary_Name";
            }
        })
    }

    function aaa() {
        $("#tt").append("<tr><th style=\"font-size:14px;\">借款人员姓名：</th><td><input class=\"easyui-textbox\" name=\"loan_Name\" data-options=\"prompt:'请输入...',validType:'txtname'\" style=\"width:200px;height:24px\"></td><th>身份证号：</th><td><input class=\"easyui-textbox\" name=\"loan_IdCard\" data-options=\"prompt:'请输入...',validType:'txtname'\" style=\"width:200px;height:24px\"></td><th>联系电话：</th><td><input class=\"easyui-textbox\" name=\"loan_TEL\" data-options=\"prompt:'请输入...',validType:'txtname'\" style=\"width:200px;height:24px\"></td><td><a href=\"#\" onclick=\"bbb()\">移除联系人</a></td></tr>")
    }
    function bbb(obj) {
        $(obj).parent().parent().remove();
    }


    // 表单提交清空
    function submitcap() {
        $("#capital").form('submit');
    }
    function submitcap() {
        $("#capital").form('clear');
    }

    function clearForm() {
        $('#ff').form('submit');
    }
    function clearForm() {
        $('#ff').form('clear');
    }
</script>